/**
 * 
 */
package org.swing.utility.jai.bean;
import java.util.HashSet;
import java.util.Set;
/**
 * @author Quynh Nhu
 *
 */
public class PhotoSet implements Comparable {
	  private Camera camera;

	  private String description;

	  private Integer id;

	  private Set photos = new HashSet();

	  private String photoSetNo;

	  private String title;

	  public PhotoSet() {
	  }

	  public void addPhoto(final Photo photo) {
	    photo.setPhotoSet(this);
	    photos.add(photo);
	  }

	  public Camera getCamera() {
	    return camera;
	  }

	  /**
	   * @return
	   */
	  public String getDescription() {
	    return description;
	  }

	  /**
	   * @return
	   */
	  public Integer getId() {
	    return id;
	  }

	  /**
	   * <p>
	   * Get the photos
	   * 
	   * @return
	   */
	  public Set getPhotos() {
	    return photos;
	  }

	  /**
	   * @return
	   */
	  public String getPhotoSetNo() {
	    return photoSetNo;
	  }

	  /**
	   * @return
	   */
	  public String getTitle() {
	    return title;
	  }

	  public void setCamera(final Camera camera) {
	    this.camera = camera;
	  }

	  /**
	   * @param string
	   */
	  public void setDescription(final String description) {
	    this.description = description;
	  }

	  /**
	   * @param integer
	   */
	  private void setId(final Integer id) {
	    this.id = id;
	  }

	  /**
	   * @param list
	   */
	  private void setPhotos(final Set photos) {
	    this.photos = photos;
	  }

	  /**
	   * @param string
	   */
	  public void setPhotoSetNo(final String rollNo) {
	    this.photoSetNo = rollNo;
	  }

	  /**
	   * @param string
	   */
	  public void setTitle(final String title) {
	    this.title = title;
	  }

	  public int compareTo(final Object o) {
	    return id.compareTo(((PhotoSet)o).id);
	  }
	}
